const fs = require("fs"); // 系统模块 无需安装
const path = require("path"); // 系统模块 无需安装
const { addLog,promiseLog } = require("../utils");

//Ios
function iosChangeFile({projectName}){
  return promiseLog({text:'移动文件到对应目录',projectName},()=>{
    return new Promise((resolve,reject)=>{
      resolve();
    })
  })
}

function iosSign({projectName}){
  return promiseLog({text:'签名',projectName,},()=>{
    return new Promise((resolve,reject)=>{
      resolve();
    })
  })
}

function iosAddMode({projectName}){
  return promiseLog({text:'添加模块',projectName,},()=>{
    return new Promise((resolve,reject)=>{
      resolve();
    })
  })
}

function iosAddPermission({projectName}){
  return promiseLog({text:'添加权限',projectName,},()=>{
    return new Promise((resolve,reject)=>{
      resolve();
    })
  })
}


function outIos(projectName){
  return promiseLog({text:'生成ipa',projectName,},()=>{
    return new Promise((resolve,reject)=>{
      global.building = global.building.filter(item => {
        return !(item.type == "Ios" && item.projectName == projectName);
      });
      resolve();
    })
  })
}

module.exports = {
  iosChangeFile,
  iosSign,
  outIos
};
